define(function(){
    function Ajax(obj){
        Object.assign(this,obj)
        this.init()
    }
    Ajax.prototype={
        constructor:Ajax,
        init:function(){
            var xml=new XMLHttpRequest()
            xml.open(this.type,this.url,this.asyns)
            xml.send()

            if(xml.readyState==4&&xml.status==200){
                var data=JSON.parse(xml.responseText)
                this.callBack(data)
            }
        }
    }
    return Ajax
})